package org.hfy;

import org.hfy.calc.Calculator;

import java.util.LinkedList;
import java.util.Queue;


/**
 * @Description:
 * @Author: Takagi
 * @date: 2023/4/23
 */
public class Main {
    public static void main(String[] args) {
        Queue<Integer> lexvalList = new LinkedList<>();
        lexvalList.add(1);
        lexvalList.add(3);
        lexvalList.add(1);
        lexvalList.add(4);
        Calculator calculator = new Calculator(Case.getStartSymbol(), Case.getProductions(), Case.getPredictedString());
        // 综合属性计算
        // calculator.synthesizedAttributeCalc(lexvalList);

        // 继承属性计算
        calculator.inheritanceAttributeCalc(lexvalList, Case.getProductionTranslation());
    }
}
